Skip to content

Conversation

Weves
Copy link
Contributor

@Weves Weves commented Jun 23, 2025

Description

^

How Has This Been Tested?

`:eyes: + tests

Backporting (check the box to trigger backport action)

Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.

  • This PR should be backported (make sure to check that the backport attempt succeeds)
  • [Optional] Override Linear Check

@Weves Weves requested a review from a team as a code owner June 23, 2025 23:37
Copy link

vercel bot commented Jun 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
internal-search ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 24, 2025 1:18am

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

Adds robust handling for long file names in S3 file storage by implementing a hash-based truncation mechanism that respects S3's 1024 character key limit.

  • Added file name length check and truncation logic in backend/onyx/file_store/file_store.py using SHA-256 hashing while preserving partial original name for readability
  • Improved path handling by properly stripping slashes from prefix and tenant ID components to prevent double slashes in S3 keys
  • Ensures deterministic file naming through consistent hashing when truncation is needed

1 file reviewed, 1 comment
Edit PR Review Bot Settings | Greptile

Copy link
Contributor

@evan-onyx evan-onyx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i agree with greptile

@Weves Weves merged commit 2bbab5c into main Jun 24, 2025
10 of 12 checks passed
@Weves Weves deleted the improve-s3-migration branch June 24, 2025 02:22
AnkitTukatek pushed a commit to TukaTek/onyx that referenced this pull request Sep 23, 2025
* Handle very long file names

* Add logging

* Enhancements

* EL comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants